import { createRouter, createWebHashHistory } from 'vue-router'
import Layout from '@/views/Layout/Layout.vue'
export default createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      component: Layout,
      children: [
        {
          path: '',// 不写表示默认打开这个组件
          component: () => import('@/views/Home/Home.vue')
        },
        {
          path: 'category',
          component: () => import('@/views/Category/Category.vue')
        }
      ]
    },
    {
      path: '/login',
      component: () => import('@/views/Login/Login.vue')
    }
  ]
})